-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement default LocalQueue #3610
base: main
Are you sure you want to change the base?
Implement default LocalQueue #3610
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yaroslava-serdiuk The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
809e481
to
aefe6a9
Compare
@@ -55,7 +59,11 @@ func (w *BaseWebhook) Default(ctx context.Context, obj runtime.Object) error { | |||
job := w.FromObject(obj) | |||
log := ctrl.LoggerFrom(ctx) | |||
log.V(5).Info("Applying defaults", "job", klog.KObj(job.Object())) | |||
ApplyDefaultForSuspend(job, w.ManageJobsWithoutQueueName) | |||
if features.Enabled(features.KueueDefaulting) && w.Queues.DefaultLocalQueue(job.Object().GetNamespace()) != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I miss the discussion but I read this change to mean:
Once KueueDefaulting is true, we will no longer use w.ManageJobsWithoutQueueName?
Should we consider deprecation of w.ManageJobsWithoutQueueName?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In k/k, we always take feature gates to eventually mean that they will be true so we should think through when we want to remove this feature gate and always opt in for this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. With KueueDefaulting ManageJobsWithoutQueueName doesn't make sense, so in case the feature go to GA, ManageJobsWithoutQueueName should be deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, if the default queue doesn't exist, ManageJobsWithoutQueueName is still useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ agree here. I was thinking of this as just a QoL improvement especially for cases where users have access to only 1 LocalQueue. It allows them to ignore any underlying Kueue details and submit their jobs as normal
aefe6a9
to
53dc0e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use JobWrapper from pkg/util/testingjobs/job/wrappers.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use JobSet wrapper from pkg/util/testingjobs/jobset/wrappers.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, can we use MPIJobWrapper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add tests for that as well?
@@ -206,6 +206,16 @@ func (m *Manager) DeleteClusterQueue(cq *kueue.ClusterQueue) { | |||
metrics.ClearClusterQueueMetrics(cq.Name) | |||
} | |||
|
|||
func (m *Manager) DefaultLocalQueue(namespace string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we always check the result of this function in if statement and compare it with ""
, can this function return true
if there is the default LocalQueue in the namespace and false
otherwise. If so, then can we rename it to something along the lines IsDefaultLQInNamespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update the docs in site/content/en/docs/installation/_index.md
?
53dc0e7
to
1a51697
Compare
pkg/features/kube_features.go
Outdated
// alpha: v0.9 | ||
// | ||
// Enable to set default LocalQueue. | ||
KueueDefaulting featuregate.Feature = "KueueDefaulting" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update as in the KEP and make sure the feature-gate is used to guard the code
1a51697
to
198d947
Compare
198d947
to
a2e7c62
Compare
@yaroslava-serdiuk: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #2936
Does this PR introduce a user-facing change?
cc: @mwielgus @KPostOffice